<!DOCTYPE html>
<html lang="en">
	<head>
		<title> New Document </title>
		<meta charset="utf-8">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Bootstrap -->
		<link href="../../resources/css/bootstrap.min.css" rel="stylesheet" media="screen">
		<link href="../../resources/css/style.css" rel="stylesheet">
		<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
		<script src="../../resources/js/bootstrap.min.js"></script>
		<script src="../../resources/js/js.js"></script>
	</head>
		<div class="">
			<table class="table table-bordered table-striped table-hover">
				<thead>
					<tr>
						<th>用户名</th>
						<th>手机号</th>
						<th>创建时间</th>
						<th>类别</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<#if listUserEntity?exists>
				<#list listUserEntity as userEntity>
					<tr>
						<td>${userEntity.user_Name}</td>
						<td>${userEntity.user_Phone}</td>
						<td>${userEntity.user_Date?string("yyyy-MM-dd")}</td>
						<#if userEntity.user_Role == "admin">
						<td>管理员</td>
						<#elseif userEntity.user_Role == "shop">
						<td>商户</td>
						<#else>
						<td>超级管理员</td>
						</#if>
						<#if userEntity.user_status == "E">
						<td>可用</td>
						<#else>
						<td>禁用</td>
						</#if>
						<td>
						<#if userEntity.user_status == "E">
						<a href="javascript:updateUser(${userEntity.user_Id},'N')">禁用</a>
						<#else>
						<a href="javascript:updateUser(${userEntity.user_Id},'E')">恢复</a>
						</#if>
						<a href="javascript:deleteUser(${userEntity.user_Id});">删除</a>
						</td>
					</tr>
				</#list>
				<#else>
				   <tr>
				       <td colspan="6">没有查询到记录！</td>
				   </tr>
				</#if>
				</tbody>
			</table>			
		</div>
		<#if listUserEntity?exists>
		<div class="pagination pagination-right">
		  <input type="hidden" name="userSelectBean" id="userSelectBean" value="${userEntity}"/>
		  <input type="hidden" name="pageEntity" id="pageEntity" value="${pageEntity}"/>
		  <ul>
		    <#if pageEntity.page==1>
		    <li class="disabled"><a href="#">&laquo;</a></li>
		    <#else>
		    <li><a href="javascript:pageHref(${pageEntity.page-1},${pageEntity.totalPage},${pageEntity.pageSize})">&laquo;</a></li>
		    </#if>
		    <#list 1..pageEntity.totalPage as i>
		         <#if pageEntity.page==i>
		    <li class="active"><a href="#">${i}</a></li>
		         <#else>
		    <li><a href="javascript:pageHref(${i},${pageEntity.totalPage},${pageEntity.pageSize})">${i}</a></li>
		        </#if>
		    </#list>
		   <#if pageEntity.page==pageEntity.totalPage>
		    <li class="disabled"><a href="#">»</a></li>
		    <#else>
		    <li><a href="javascript:pageHref(${pageEntity.page+1},${pageEntity.totalPage},${pageEntity.pageSize})">»</a></li>
		    </#if>
		  </ul>
		</div>
		</#if>
</html>
